package com.wenchao.jetpackdemo.dataBinding

import android.view.View
import androidx.databinding.BaseObservable
import androidx.databinding.ObservableInt

/**
 * 【类的描述】介绍一下该类的用途
 * @author zhangwenchao
 * @date 2021-12-25
 */
class OneWayBindingViewModel(num: Int) : BaseObservable() {

    var numObservable: ObservableInt = ObservableInt();

    init {
        numObservable.set(num)
    }


    fun onOneWayBindingClick(view: View) {
        val temp = numObservable.get() + 1
        numObservable.set(temp)
    }

}